<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS盒子模型示例 - lab3-1</title>
    <link rel="stylesheet" href="lab3-1.css">
</head>
<body>
    <header>
        <h1>CSS盒子模型演示</h1>
        <p>理解标准盒子模型与border-box盒子模型的区别</p>
    </header>
    
    <main>
        <div class="box-demo">
            <div class="standard-box">
                <h2>标准盒子模型</h2>
                <p>width: 200px</p>
                <p>height: 150px</p>
                <p>padding: 20px</p>
                <p>border: 5px</p>
                <p class="calculation">总宽度: 250px</p>
            </div>
            
            <div class="border-box">
                <h2>border-box盒子模型</h2>
                <p>width: 200px</p>
                <p>height: 150px</p>
                <p>padding: 20px</p>
                <p>border: 5px</p>
                <p class="calculation">总宽度: 200px</p>
            </div>
        </div>
        
        <div class="explanation">
            <h3>盒子模型组成部分</h3>
            <ul>
                <li><span class="content">内容区(Content)</span>：元素实际内容区域</li>
                <li><span class="padding">内边距(Padding)</span>：内容区与边框之间的空间</li>
                <li><span class="border">边框(Border)</span>：围绕内边距的线条</li>
                <li><span class="margin">外边距(Margin)</span>：盒子与其他元素之间的空间</li>
            </ul>
        </div>
    </main>
    
    <footer>
        <p>CSS盒子模型实验 - lab3-1</p>
    </footer>
</body>
</html>
